import Layout from "@/layouts/admin.vue";

export default {
  path: "/admin",
  component: Layout,
  redirect: "/admin/dashboard",
  meta: {
    title: "系统管理后台",
    requiresAuth: true,
    requiresAdmin: true,
  },
  children: [
    {
      path: "profile",
      name: "AdminProfile",
      component: () => import("@/views/admin/profile.vue"),
      meta: {
        title: "个人信息",
        requiresAdmin: true,
        hideInMenu: true,
      },
    },
    {
      path: "settings",
      name: "AdminSettings",
      component: () => import("@/views/admin/settings.vue"),
      meta: {
        title: "账号设置",
        requiresAdmin: true,
        hideInMenu: true,
      },
    },
    {
      path: "dashboard",
      name: "Dashboard",
      component: () => import("@/views/admin/dashboard.vue"),
      meta: {
        title: "控制台",
        icon: "dashboard",
        requiresAdmin: true,
      },
    },
    {
      path: "hotels",
      name: "Hotels",
      meta: {
        title: "酒店管理",
        icon: "fas fa-home",
        requiresAdmin: true,
      },
      children: [
        {
          path: "list",
          name: "HotelList",
          component: () => import("@/views/admin/hotels/index.vue"),
          meta: {
            title: "酒店列表",
            requiresAdmin: true,
          },
        },
        {
          path: "reports",
          name: "HotelReports",
          component: () => import("@/views/admin/hotels/reports.vue"),
          meta: {
            title: "违规举报",
            requiresAdmin: true,
          },
        },
        {
          path: "qualification",
          name: "HotelQualification",
          component: () => import("@/views/admin/hotels/qualification.vue"),
          meta: {
            title: "资质审核",
            requiresAdmin: true,
          },
        },
        {
          path: "credit",
          name: "HotelCredit",
          component: () => import("@/views/admin/hotels/credit.vue"),
          meta: {
            title: "信用评级",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "users",
      name: "Users",
      meta: {
        title: "用户管理",
        icon: "fas fa-user",
        requiresAdmin: true,
      },
      children: [
        {
          path: "list",
          name: "UserList",
          component: () => import("@/views/admin/users/index.vue"),
          meta: {
            title: "用户列表",
            requiresAdmin: true,
          },
        },
        {
          path: "feedback",
          name: "UserFeedback",
          component: () => import("@/views/admin/users/feedback.vue"),
          meta: {
            title: "用户反馈",
            requiresAdmin: true,
          },
        },
        {
          path: "blacklist",
          name: "UserBlacklist",
          component: () => import("@/views/admin/users/blacklist.vue"),
          meta: {
            title: "黑名单",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "merchants",
      name: "Merchants",
      meta: {
        title: "商家管理",
        icon: "fas fa-store",
        requiresAdmin: true,
      },
      children: [
        {
          path: "list",
          name: "MerchantList",
          component: () => import("@/views/admin/merchants/index.vue"),
          meta: {
            title: "商家列表",
            requiresAdmin: true,
          },
        },
        {
          path: "edit/:id",
          name: "MerchantEdit",
          component: () => import("@/views/admin/merchants/edit.vue"),
          meta: {
            title: "编辑商家",
            requiresAdmin: true,
            hideInMenu: true,
          },
        },
        {
          path: "reports",
          name: "MerchantReports",
          component: () => import("@/views/admin/merchants/reports.vue"),
          meta: {
            title: "违规举报",
            requiresAdmin: true,
          },
        },
        {
          path: "qualification",
          name: "MerchantQualification",
          component: () => import("@/views/admin/merchants/qualification.vue"),
          meta: {
            title: "资质审核",
            requiresAdmin: true,
          },
        },
        {
          path: "credit",
          name: "MerchantCredit",
          component: () => import("@/views/admin/merchants/rating.vue"),
          meta: {
            title: "信用评级",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "guides",
      name: "AdminGuides",
      meta: {
        title: "导游管理",
        icon: "fas fa-user-tie",
        requiresAdmin: true,
      },
      children: [
        {
          path: "list",
          name: "AdminGuideList",
          component: () => import("@/views/admin/guides/index.vue"),
          meta: {
            title: "导游列表",
            requiresAdmin: true,
          },
        },
        {
          path: "edit/:id",
          name: "AdminGuideEdit",
          component: () => import("@/views/admin/guides/edit.vue"),
          meta: {
            title: "编辑导游",
            requiresAdmin: true,
            hideInMenu: true,
          },
        },
        {
          path: "qualification",
          name: "AdminGuideQualification",
          component: () => import("@/views/admin/guides/qualification.vue"),
          meta: {
            title: "资质审核",
            requiresAdmin: true,
          },
        },
        {
          path: "orders",
          name: "AdminGuideOrders",
          component: () => import("@/views/admin/guides/orders.vue"),
          meta: {
            title: "订单管理",
            requiresAdmin: true,
          },
        },
        {
          path: "refunds",
          name: "AdminGuideRefunds",
          component: () => import("@/views/admin/guides/refunds.vue"),
          meta: {
            title: "退款处理",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "content",
      name: "Content",
      component: () => import("@/layouts/blank.vue"),
      meta: {
        title: "内容管理",
        icon: "fas fa-file-alt",
        requiresAdmin: true,
      },
      children: [
        {
          path: "spots",
          name: "SpotsManagement",
          component: () => import("@/views/admin/content/spots/index.vue"),
          meta: {
            title: "景点管理",
            requiresAdmin: true,
          },
        },
        {
          path: "spots/category",
          name: "SpotsCategory",
          component: () => import("@/views/admin/content/spots/category.vue"),
          meta: {
            title: "景点分类",
            requiresAdmin: true,
          },
        },
        {
          path: "spots/edit",
          name: "SpotEdit",
          component: () => import("@/views/admin/content/spots/edit.vue"),
          meta: {
            title: "编辑景点",
            requiresAdmin: true,
            hideInMenu: true,
          },
        },
        {
          path: "articles",
          name: "Articles",
          component: () => import("@/views/admin/content/articles/index.vue"),
          meta: {
            title: "文章管理",
            requiresAdmin: true,
          },
        },
        {
          path: "activities",
          name: "Activities",
          component: () =>
            import("@/views/admin/content/articles/activities.vue"),
          meta: {
            title: "活动资讯",
            requiresAdmin: true,
          },
        },
        {
          path: "media/images",
          name: "Images",
          component: () => import("@/views/admin/content/media/images.vue"),
          meta: {
            title: "图片库",
            requiresAdmin: true,
          },
        },
        {
          path: "media/videos",
          name: "Videos",
          component: () => import("@/views/admin/content/media/videos.vue"),
          meta: {
            title: "视频库",
            requiresAdmin: true,
          },
        },
        {
          path: "food/list",
          name: "FoodList",
          component: () => import("@/views/admin/content/food/index.vue"),
          meta: {
            title: "美食列表",
            requiresAdmin: true,
          },
        },
        {
          path: "food/category",
          name: "FoodCategory",
          component: () => import("@/views/admin/content/food/category.vue"),
          meta: {
            title: "美食分类",
            requiresAdmin: true,
          },
        },
        {
          path: "food/recommend",
          name: "FoodRecommend",
          component: () => import("@/views/admin/content/food/recommend.vue"),
          meta: {
            title: "推荐管理",
            requiresAdmin: true,
          },
        },
        {
          path: "food/edit",
          name: "FoodEdit",
          component: () => import("@/views/admin/content/food/edit.vue"),
          meta: {
            title: "编辑美食",
            requiresAdmin: true,
            hideInMenu: true,
          },
        },
        {
          path: "experiences/list",
          name: "ExperiencesList",
          component: () =>
            import("@/views/admin/content/experiences/index.vue"),
          meta: {
            title: "体验项目",
            requiresAdmin: true,
          },
        },
        {
          path: "experiences/category",
          name: "ExperiencesCategory",
          component: () =>
            import("@/views/admin/content/experiences/category.vue"),
          meta: {
            title: "体验分类",
            requiresAdmin: true,
          },
        },
        {
          path: "experiences/orders",
          name: "ExperiencesOrders",
          component: () =>
            import("@/views/admin/content/experiences/orders.vue"),
          meta: {
            title: "体验订单",
            requiresAdmin: true,
          },
        },
        {
          path: "experiences/edit",
          name: "ExperienceEdit",
          component: () => import("@/views/admin/content/experiences/edit.vue"),
          meta: {
            title: "编辑体验",
            requiresAdmin: true,
            hideInMenu: true,
          },
        },
      ],
    },
    {
      path: "orders",
      name: "Orders",
      meta: {
        title: "订单管理",
        icon: "fas fa-shopping-cart",
        requiresAdmin: true,
      },
      children: [
        {
          path: "tickets",
          name: "TicketOrders",
          component: () => import("@/views/admin/orders/index.vue"),
          meta: {
            title: "门票订单",
            requiresAdmin: true,
          },
        },
        {
          path: "refunds",
          name: "Refunds",
          component: () => import("@/views/admin/orders/refunds.vue"),
          meta: {
            title: "退款处理",
            requiresAdmin: true,
          },
        },
        {
          path: "complaints",
          name: "Complaints",
          component: () => import("@/views/admin/orders/complaints.vue"),
          meta: {
            title: "投诉处理",
            requiresAdmin: true,
          },
        },
        {
          path: "arbitration",
          name: "OrderArbitration",
          component: () => import("@/views/admin/orders/arbitration.vue"),
          meta: {
            title: "纠纷仲裁",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "finance",
      name: "Finance",
      meta: {
        title: "财务管理",
        icon: "fas fa-money",
        requiresAdmin: true,
      },
      children: [
        {
          path: "statements",
          name: "FinanceStatements",
          component: () => import("@/views/admin/finance/statements.vue"),
          meta: {
            title: "收入统计",
            requiresAdmin: true,
          },
        },
        {
          path: "refund-audit",
          name: "RefundAudit",
          component: () => import("@/views/admin/finance/refund-audit.vue"),
          meta: {
            title: "退款审核",
            requiresAdmin: true,
          },
        },
        {
          path: "reconciliation",
          name: "Reconciliation",
          component: () => import("@/views/admin/finance/reconciliation.vue"),
          meta: {
            title: "对账管理",
            requiresAdmin: true,
          },
        },
        {
          path: "invoice",
          name: "Invoice",
          component: () => import("@/views/admin/finance/invoice.vue"),
          meta: {
            title: "发票管理",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "statistics",
      name: "Statistics",
      meta: {
        title: "数据统计",
        icon: "fas fa-chart-line",
        requiresAdmin: true,
      },
      children: [
        {
          path: "operation",
          name: "OperationData",
          component: () => import("@/views/admin/statistics/operation.vue"),
          meta: {
            title: "运营数据",
            requiresAdmin: true,
          },
        },
        {
          path: "transaction",
          name: "TransactionData",
          component: () => import("@/views/admin/statistics/transaction.vue"),
          meta: {
            title: "交易数据",
            requiresAdmin: true,
          },
        },
        {
          path: "behavior",
          name: "UserBehavior",
          component: () => import("@/views/admin/statistics/behavior.vue"),
          meta: {
            title: "用户行为",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "settings",
      name: "Settings",
      meta: {
        title: "系统设置",
        icon: "fas fa-setting",
        requiresAdmin: true,
      },
      children: [
        {
          path: "config",
          name: "SystemConfig",
          component: () => import("@/views/admin/settings/config.vue"),
          meta: {
            title: "系统设置",
            icon: "setting",
            requiresAdmin: true,
            keepAlive: false,
          },
        },
        {
          path: "roles",
          name: "RoleManagement",
          component: () => import("@/views/admin/settings/roles.vue"),
          meta: {
            title: "角色权限",
            requiresAdmin: true,
          },
        },
        {
          path: "logs",
          name: "SystemLogs",
          component: () => import("@/views/admin/settings/logs.vue"),
          meta: {
            title: "操作日志",
            requiresAdmin: true,
          },
        },
      ],
    },
    {
      path: "notification",
      name: "AdminNotification",
      component: () => import("@/views/admin/notification.vue"),
      meta: {
        title: "消息中心",
        requiresAdmin: true,
        hideInMenu: true,
      },
    },
  ],
};
